﻿#include "FITKAcousticsAbstractAdaptor.h"
#include "FITKAcousticsHDF5Reader.h"
#include "FITKAcousticsHDF5Writer.h"

namespace IO
{

    FITKAcousticsAbsAdaptor::~FITKAcousticsAbsAdaptor()
    {

    }

    void FITKAcousticsAbsAdaptor::setReader(FITKAcousticsHDF5Reader* reader)
    {
        _reader = reader;
    }

    void FITKAcousticsAbsAdaptor::setWriter(FITKAcousticsHDF5Wriiter* writer)
    {
        _writer = writer;
    }

    

    IO::FITKHDF5FileTool* FITKAcousticsAbsAdaptor::getHDF5Tool(const bool& readProcsss)
    {
        //读取
        if (readProcsss)
        {
            if (_reader) return _reader->getHDF5FileTool();
            return nullptr;
        }
        //写出
        else
        {
            if (_writer) return _writer->getHDF5FileTool();
            return nullptr;
        }
    }

}



